using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._MultidimensionTools._NetCDF
{
    /// <summary>
    /// <para>Make NetCDF Table View</para>
    /// <para>Makes a table view from a netCDF file.</para>
    /// <para>从 netCDF 文件创建表视图。</para>
    /// </summary>    
    [DisplayName("Make NetCDF Table View")]
    public class MakeNetCDFTableView : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public MakeNetCDFTableView()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_netCDF_file">
        /// <para>Input netCDF File</para>
        /// <para>The input netCDF file.</para>
        /// <para>输入 netCDF 文件。</para>
        /// </param>
        /// <param name="_variable">
        /// <para>Variables</para>
        /// <para>The netCDF variable, or variables, used to create fields in the table view.</para>
        /// <para>用于在表视图中创建字段的一个或多个 netCDF 变量。</para>
        /// </param>
        /// <param name="_out_table_view">
        /// <para>Output Table View</para>
        /// <para>The name of the output table view.</para>
        /// <para>输出表视图的名称。</para>
        /// </param>
        public MakeNetCDFTableView(object _in_netCDF_file, List<object> _variable, object _out_table_view)
        {
            this._in_netCDF_file = _in_netCDF_file;
            this._variable = _variable;
            this._out_table_view = _out_table_view;
        }
        public override string ToolboxName => "Multidimension Tools";

        public override string ToolName => "Make NetCDF Table View";

        public override string CallName => "md.MakeNetCDFTableView";

        public override List<string> AcceptEnvironments => ["workspace"];

        public override object[] ParameterInfo => [_in_netCDF_file, _variable, _out_table_view, _row_dimension, _dimension_values, _value_selection_method.GetGPValue()];

        /// <summary>
        /// <para>Input netCDF File</para>
        /// <para>The input netCDF file.</para>
        /// <para>输入 netCDF 文件。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input netCDF File")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_netCDF_file { get; set; }


        /// <summary>
        /// <para>Variables</para>
        /// <para>The netCDF variable, or variables, used to create fields in the table view.</para>
        /// <para>用于在表视图中创建字段的一个或多个 netCDF 变量。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Variables")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public List<object> _variable { get; set; }


        /// <summary>
        /// <para>Output Table View</para>
        /// <para>The name of the output table view.</para>
        /// <para>输出表视图的名称。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Table View")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_table_view { get; set; }


        /// <summary>
        /// <para>Row Dimensions</para>
        /// <para><xdoc>
        ///   <para>The netCDF dimension, or dimensions, used to create fields populated with unique values in the table view. The dimension, or dimensions, set here determine the number of rows in the table view and the fields that will be present.</para>
        ///   <para>For instance, if stationID is a dimension in the netCDF file and has 10 values, by setting stationID as the dimension to use, 10 rows will be created in the table view. If stationID and time are used and there are 3 time slices, 30 rows will be created in the table view.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>用于在表视图中创建填充了唯一值的字段的一个或多个 netCDF 维度。此处设置的一个或多个维度决定了表视图中的行数和将显示的字段。</para>
        ///   <para>例如，如果 stationID 是 netCDF 文件中的一个维度并且有 10 个值，则通过将 stationID 设置为要使用的维度，将在表视图中创建 10 行。如果使用 stationID 和 time，并且有 3 个时间片，则将在表视图中创建 30 行。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Row Dimensions")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public List<object> _row_dimension { get; set; } = null;


        /// <summary>
        /// <para>Dimension Values</para>
        /// <para><xdoc>
        ///   <para>A set of dimension-value pairs used to specify a slice of a multidimensional variable.</para>
        ///   <bulletList>
        ///     <bullet_item>Dimension—A netCDF dimension.</bullet_item><para/>
        ///     <bullet_item>Value—The dimension value to use.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>一组维度-值对，用于指定多维变量的切片。</para>
        ///   <bulletList>
        ///     <bullet_item>维度 - netCDF 维度。</bullet_item><para/>
        ///     <bullet_item>值 - 要使用的维度值。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Dimension Values")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _dimension_values { get; set; } = null;


        /// <summary>
        /// <para>Value Selection Method</para>
        /// <para><xdoc>
        ///   <para>Specifies the dimension value selection method that will be used.</para>
        ///   <bulletList>
        ///     <bullet_item>By value—The input value is matched with the actual dimension value.</bullet_item><para/>
        ///     <bullet_item>By index—The input value is matched with the position or index of a dimension value. The index is 0 based; that is, the position starts at 0.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定将使用的尺寸值选择方法。</para>
        ///   <bulletList>
        ///     <bullet_item>按值 - 输入值与实际尺寸值匹配。</bullet_item><para/>
        ///     <bullet_item>按索引 - 输入值与维度值的位置或索引匹配。该指数以 0 为基础;也就是说，仓位从 0 开始。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Value Selection Method")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _value_selection_method_value _value_selection_method { get; set; } = _value_selection_method_value._BY_VALUE;

        public enum _value_selection_method_value
        {
            /// <summary>
            /// <para>By index</para>
            /// <para>By index—The input value is matched with the position or index of a dimension value. The index is 0 based; that is, the position starts at 0.</para>
            /// <para>按索引 - 输入值与维度值的位置或索引匹配。该指数以 0 为基础;也就是说，仓位从 0 开始。</para>
            /// </summary>
            [Description("By index")]
            [GPEnumValue("BY_INDEX")]
            _BY_INDEX,

            /// <summary>
            /// <para>By value</para>
            /// <para>By value—The input value is matched with the actual dimension value.</para>
            /// <para>按值 - 输入值与实际尺寸值匹配。</para>
            /// </summary>
            [Description("By value")]
            [GPEnumValue("BY_VALUE")]
            _BY_VALUE,

        }

        public MakeNetCDFTableView SetEnv(object workspace = null)
        {
            base.SetEnv(workspace: workspace);
            return this;
        }

    }

}